Catch exception when clean script is called
Added more metadata exceptions