Add logging, handle distinct