validations and logging