fix bug: the peaces file could be empty