capturing wim exceptions properly