Ahead of IPO, Hero FinCorp writes off bad loans worth around Rs 1,200 crore