BAC-1244: bunch of improvements for logging and command-line arguments