do validation at the end, after we've done with -r etc