Fixed a bug where the first file was not closed properly
Import now works