Added check for pre-existing commands