Fixed bug of when number of files is large subprocess call may fail