Added an option for metadata dir