Add file logging using winston.

Do not make it public yet, we need to fix log rotation first.
I don't understand why the argument is named as output. We should find an alternative which is more appropriate. It doesn't help with the readability as you assume the output should be an argument that is being mutated by this function.