Flush makes no sense anymore
because checks and receiving does not take place at the same time.
Added run_logger for saving sensor data.