use process.env.PWD instead of __dirname for Heroku