Make env.sh expandable via scratch dir. Add Crawler check and expose log method.