Cleaning up logging and sensor retrieval