updating first part of file