added sanity check for log data - cannot be less than zero