Fix history recording

- also turning it into async mode