factorize glob.glob to exclude special file