In the fileio.c extension, change the filetype(MODE) function into lsmode(MODE).