moved diag_log