Added error checking for reloadDatabase
Fixed some typos and bugs with saveDatabase and reloadDatabase