Added file extraction and a test for it