Replace filepath with key.