Check before running commands