HUE-1509 [core] Truncate hue.pth instead of overwrite