Log only if there is anything to log.
Merge pull request #3 from ikudriavtsev/master

Log only if there is anything to log.