fixed unable to write log