error with ctypes, cannot identify file type