Modify fetch.js to check job.env