Add some preconditions on command execution.