MINOR tidied up validation before writing