adding check for environment for rake task