Improve error handling in onApplicationStop() method

If some plugin throws exception in onApplicationStop() method, onApplicationStop() is not called for other plugins.
Instead, we should log it and continue to call other plugins.