regenerate empty file on edit and add