add support to avoid creating new file if no change made

merge from https://bugs.webkit.org/show_bug.cgi?id=113465