public void saveNote(Note note, String contents) {
   database.child(note.getId()).setValue(note);
   saveToFile(note, password, contents);
   saveToFirebase(note, password, contents);
 }
 private boolean noteFileExists(Note note) {
   return new File(filesDir, note.getFileName()).exists();
 }