Add error check on start/end time