remove file creation functions; replace with piece_index creation