* move housekeeping tasks before readbuffer