First iteration of record and replay