modified error handling in parse.js