test: Make write a loop