fix filename check