homework 9 writing to disk