Did you read the rest of my post? Sure, it establishes the communication but you ruin it afterwards by writing to the same interface. Your Modbus device won't recognize your debugging strings and mark the complete protocol as failed.
No this code is executed only if the transmission was correct. It cannot be correct because you interrupted the protocol by writing stuff as above "Result: " to the Modbus interface.