fixed. #15

Refactoring check_commands.sh