Rather use (Get-PsProvider 'FileSystem').home, in case the user ~ is not pointing to $home. This can happen if the user wants to keep $home on $Env:USERPROFILE but is working in a different folder and want it to be ~ (for simplicity).