storing return value of write, may want to use in the future. this gets rid of warning.