Extract file helper