fixed snprintf problem; no database logging if sensor data is not available