Check CPU usage and saving to file.