[FIX] Several incorrect file I/O calls (Thanks, Q4-Bi).