added error reporting for mysqli connection
added routes and enabled output