add log & drain handler