fixed writefile macro, add gitignore