Bugs and memory fixes

Fixed a bug with opening files that aren't actually there, added a quick error reporting function, and cut down about 1000 lost bytes (yay).