Tested parser with some bad files, added some more strict checking and better error messages.