Changed handling of existing files