Handle filenames with spaces and show optimization progress.