Changed for loop to twenty individual write system calls