avoid changing target files that might not exist in templates