Generate to temporary directory first to ensure availability while generating