Do proper homework before buying a flat