Added a check to make sure the brick exists before recording time.