modified file exists function so it is not hardcoded to the fileDB path