I saw you are using os.system and commands.getoutput to execute a command. Yes they are possible. But why not to use utils.run?
Am I missing something?