Only escape file name when needed