Add log when debug is enabled. More accurate locations in final log