fixed problem with writer file