Fix for file I/O in linux