Added .gitignore
Use BufferedWriter instead of PrintWriter so exceptions aren't swallowed