Add error logging to affected_rows()