Added debug- and error-handling defines