Changed from dout to log.debug in RemovePatter