added comments to error_handler