RE: Getting 'bad file number' error writing to device driver