Fix .gitignore, add some debugging printfs.