on error: log and set status