Adding writef tests