moved findBootstrapEnvironment into utils