Fixed bug with file undefined file pointer.