Adding logging for debug.