use flush timestamps and add record handler