Update filepath when editing a file