fixed test cases. write the gitignore file automatically