Fix editor file writing (#57)