Make sure before os.path.isfile(path) path is non null;Extra clean up