corrected Typo in error message
Added debug print for Database logging.