Updated file naming function