print error message with filename when failing to initialize a database

Code currently creates a pretty useful error message that tells you the name of the file it could not initialize, then prints a less useful error message. I think we should use the useful error message.