Wrapped the DB save in a try/catch block as it is possible that we may not be able to write the metadata to the DB.