Fix io_compile_file when fopen returns NULL