Write environment as soon as job id has been returned.