Use "$HOME" instead of "~" to behave correctly on different platforms