added function to determine if database has keys so it does not overwrite updates on load