write the id before opening in an editor