Ignore backup files.
Add some basic exception handling.
Fix an internal function name.