First pass at being smarter about regenerating files