RAZ-1892: Better error management on import of metadata file
Small code change