fixed unexpectable failures of data collection and added wake lock