add command only when invoked as script