Create and apply patch