Landlord not returning SD.

Hi i am vineesh i took a flat for rent in hyderabad and paid a security deposit of rs 37500(3 months). In the rental agreement it is stated that i need to notify them before 2 months for vacating. i notified them on nov 3rd that i will be vacating on jan 8th through email. but unfortunately i had to change my plans and had to vacate in december. So i again mailed him telling that i will vacate in december and asked whether any problem is there. He said no and said he will return the security deposit once i vacate. After vacating he changed his mind and said that he will not bear the loss until he gets a tenant. I had notified that i will vacate in january first and then changed to december ie 1 month loss(12500). He got new tenants after 20 days. So even if there is a loss it should be of max 20 days. After some days he again mailed me saying there are some damages in the house and told he will deduct for all those. He is troubling me a lot. Now its been more than a month since i have vacated and now he is telling that he will be giving only 11000(Dont know how that calculation came up). All communication with the landlord was done through email and whatsapp. What can be done from my side. pls do help me.