Fix filename always being set to the first file's path.