Fixed bug where files needed an extra space at the end