added debug log flag