Fix missing file name issue in path management