Update .gitignore; fix error checking.
Add config file support.