Fixed file_open() to work properly.