About loc

Respected Legal Experts, I have a typical situation and i am unable to find an approach for the same. I travelled abroad in Oct,2021 & there was a Case raised in Dec 2021 and LOC as well, I wasn't communicated about the same, i visited BLR, India in Oct 2021 and was detained by Immigration stating LOC, they didn't give me copy stating its confidential and submitted me to BLR Police and then to the Originator of LOC i.e. Hyderabad Police, then i proceeded to Court and took court order to return to my current resident country where i have job, then 2nd day i had a ticket and when i reached immigration it was the same repeat exercise, but this time at BLR police asked Hyderabad police to take custody but they explained the LOC is under canceling and they dont need me in custody, but for formal communication and my release they intentionally delayed 16hrs. In due course they behaved too odd which was indicative that they might not follow proper procedures on time to get the LOC cancelled. I have taken certified true copy of Court order returning my passport and permitting me to travel abroad and the same was copied to concerned PS. So, how do i proceed to move forward and take a quick steps to travel back. My work is getting hampered and my previous detaintion with my family by immigration and cancelling my travel already costed me 3000USD, i couldn't risk any time or money any further and i am clueless to move forward.