try to fix file descriptor leakage
handles when deps' arch not met