fix missing unlink of metadata dir
add metadata (options)