Fix to use '~' for HOME