update single file extraction function