On what all basis house owner can deduct security amount given by tenant at the time of returning.

Hi, I was living as a tenant in one of the flat in Pune. Since my agreement was over then I decided to leave the flat on 30 Nov 2017. We asked owner to visit in the last week of November so that he can confirm us that he is ok with the flats and no damages has been done. He was agreed at that time but told us that he would be returning our money soon. And he told us that he is not going to deduct any money, but we only need to trust him for some days. Since there was pending gas bill as it was not generated for 4-5 months, so that was the only pending thing from our side And we agreed on the fact that we can settle that amount once the bill is generated. We provided security as 40k but he refunded 28k on 12 Dec 2017 and stating that he is keeping 12k for the gas bill. Now he tentatively created gas bill of 3700rs on 10 jan 2018 on the basis of meter reading and informed us that he would be cutting 3500rs more for the repair and maintenance and would be returning only 4800 back to us. When we asked the reason to cut 3500rs after 1.5 months, he is saying your house was not clean and giving excuses. So just wanted to understand, is he right to deduct 3500rs from the security or we can file a civil case against him?