fix in sampler. validation methods, added logger.