improving error reporting in case the input cannot be parsed.