Instead of repeating it in every command, you should put it into the command class and wrap run()