fix service end of file