Error: Inappropriate ioctl for device (os error 25)