Updated the .gitingore template and wrapped more config variables in if not defined