take alexeys commit: log to file instead of cout