The main reason you are possibily getting the error is you need to make sure all the filenames and locations are correct, If my post is somewhat misleading please let me know and I will reimplement it with the latest version of x-cart to see if it is still working correctly.
hth.