Added debug, warn, and error helper functions and made them work