helpers to edit files