refactor && add cpio fail