added error reporting #923