added check for is app running to collect logs