Break non-check code out of check_environment.rb