Moved vol file construction code to new function