write data into local tmp json file
add root path for heroku
check file path on the log

file is not able to write in tmp on heroku
debugging
check if file is there in different request

testing heroku
confirmed tmp file created on heroku

successfully created tmp file on heroku.
one can only read the tmp file on the same dyno,
  which is the web dyno itself.
login by 'heroku run bash' is taken as another dyno,
  which is not able to read on the file created by web.