improved startup script generation