handle IllegalArgumentException when app is terminating

handle IllegalArgumentException when app is terminating during plugin init

Fixes #110