Added exists function to check if a given file exists in device storage.