working on writing extracted files