avoid file access if not necessary