@rbtdata I'm not familiar with the CR10 but I've had a look at your config.g and your Z homing files and there seem to be some inconsistencies. Can you let us know where the end stops are physically connected. The most usual arrangement is to have them at the low end of all axes but it's not obligatory. Oh, and do you move the gantry up and down in Z, or the bed?
So the most common arrangement would be the X switch located on the left of the X axis, the Y switch located at the front, and the Z switch located at the top of the bed travel or at the bottom of the gantry if the bed is static in Z.