add log for error