added validate function to logger