added guard and fixed .gitignore