addressed more review comments; command line parsing; more null checks; logger