Added warnign & error handlers as well as more console debugging functions