read patch files