Added lineinfile to avoid overwritting the same file