Add logger method and some abstraction to commands for SM