Added try catch to retrieve metadata