added a blink function and changed writes to use seekp for proper streaming