If records is nil, we will panic. Implement a mutex to prevent this.