Fixed the bug resulting of a file as parameter. Should have fixed the MemoryError bug on big files.