add logging initialization in all commands; reformat code (#62)