fix bug about invalid "write debug log to file"