replaced process.cwd() with __dirname so that it will work on heroku