add gitignore, maybe stop crashing by freeing resources