Added error message to console if debug is enabled