game crashes on attempting to read a non-existing file

I have resumed work on a project that I had abandoned a few months ago. I’ve been using file io to read score, obstacle positions etc. If a file doesn’t exist I create it and add the contents from code. I did this by calling the io.read(path,“r”) function and write if(not file). This seems to have stopped working now. If the file doesn’t exist the game crashes completely. I have even tried wrapping the function with a pcall, but it doesn’t work. Has lua stopped using this convention? Is there anyone else facing the same problem?  

Can you post your fileExists() code?

Alternative, you could use my io lib: https://gist.github.com/HoraceBury/d8d2fa3382f82a7c7faa

Have you tried creating a completely separate main.lua in a different folder as a segregated test?

Further, if you’re convinced it’s a change in the Corona build (I’m not, but perhaps it’s a bug) have you tried installing a legacy build?

Alright thanks for the input, I’ll try these one by one and see if I could get the code running.

Can you post your fileExists() code?

Alternative, you could use my io lib: https://gist.github.com/HoraceBury/d8d2fa3382f82a7c7faa

Have you tried creating a completely separate main.lua in a different folder as a segregated test?

Further, if you’re convinced it’s a change in the Corona build (I’m not, but perhaps it’s a bug) have you tried installing a legacy build?

Alright thanks for the input, I’ll try these one by one and see if I could get the code running.