add log for error status