update file re and strip whitespace