updated to write gitignore to correct file