instead of using a temp file, just gen to the real one directly