More error checking and loading of DB