Only log when debug is turned on