Improved binary patch algorithm after testing with a clean workspace