changed time field to Time
changed time field to Time
improved error logging