fix the bug that modify the order of generating image by cpio.