validate the generate files, correct a bug and return success