Update handling of exeptions in cleanup for shares