Fixed issue CSTL-1008 export metadata xml was not working for data but only dataset now it takes in account both if metadata exists.