Replace prints with loggging
Fix shortcut test.
Made @kvh's suggested changes