Apply sed to correct file