when updating to firebase, write to local copy as well