added mysql log to save func