added error reporting for the user