Added logging

Also updated gitignore.