Update database.php

Updated Error handling to use LogToConsole!