handle IllegalArgumentException when app is terminating during plugin init

Fixes #110
Merge pull request #113 from don/issue110

handle IllegalArgumentException when app is terminating