Added condition for application start. Needs to be invoked directly.