Add check_environment.rb script and call from shell script