add file open modes for options JSON file and make the filename variable name more descriptive