Move patching process to another script