fix apply setup for existing files