Add metadata file on the fly

i(instead of writing it to disk)