Added application lock for singleton application instance.