Making sure generated files are valid