Small refactor using template.


Use a template, fixes bug with no comment, you dont need to move file anymore. Also removes existing file if existant