Added logging and deleting of measurements