Closed printwriter after sending data. And updated gitignore