Modify client message handler to insert measurements into database