change ~ to $HOME