Working code for saving DGUK metadata; partial code on saving DGUK files