using os.path.expanduser which will detect the ~ and go to the home directory to fetch the file