Fix log file not being opened and closed properly

Issue 1:
streamDate is not set, stream (file descriptor) is created in every logging

Issue 2:
cleanOldFiles this is used, instead of 'self'

Issue 3:
In _createStream, a new 'this.stream' is called right after 'this.flush'
(async), the 'this.flush' may overwrite the newly created 'this.stream'

Issue 4:
in _createStream, old file is not closed