-Added Error checking to create-db file and ran it in the index file.