Updating sequential file using java