Minor - format code.
If show query, then save it also in the error_log.