Luggage detained for lack of valid ticket

I was travelling by train from Kigoma to Morogoro to visit my brother. When we reached Tabora my brother called to inform me that he has been transferred to Dar es Salaam, thus advised me not to disembark at Morogoro but come to Dar es Salaam railway station where he would pick me up. On the way from Morogoro to Dar es Salaam a corporation officer passed our wagon checking the tickets and noted that my ticket was valid for a route from Kigoma to Morogoro. He wanted me to pay an extra fare and a penalty for travelling without a valid ticket. I told him the whole story and the fact that I had no extra money to pay. The officer confiscated my luggage unless I pay the extra fare and penalty. Was the officer justified in confiscating my luggage?
 KK, Kibondo   

The Railways Act, 2017, (the Act) bars a person to travel in a class of a passenger train higher than that for which he is in possession of a valid ticket; a passenger train beyond the place authorized by his ticket; or a person to travel in a passenger train which is not for that particular service. When a person travels in a train in contravention of these provisions, that person will be required to pay to the Corporation, on top of actual fare, the penalty of hundred percent of a fare.

Section 55(1) of the Act allows the Corporation to detain the cargo or luggage of a person who fails to pay any fare on demand. It states that where any person fails to pay on demand made by an authorised employee any fare, rate or charge due from him as a passenger or in respect of any goods, the Corporation may detain the whole or any part of such goods including the luggage of the passenger. Thus the officer was justified to confiscate your luggage for your failure to pay the extra fare and penalty.