before hook should clear error_msg (rerun scenario)