Improve error handling in fingerprints script.