fix bug in restore output path