Fixed bug in extractfile(). Was not opening file first.