changed ~ to $HOME
updated