added background data logging.