Added writing end reading from file