removed redundant using expanduser function