applying patches to files on disk