don't open log file before trancate file

failed to trancate file while file has opened on some filesystem(on the win32), don't open log file before trancate file.

I hope influxdb can be ported to win32 platform, I have more pull request, which is one of。