improved error message in event of parsing failure