You increase the probability of writing a good thesis, when the topic you select is of your interest and appeals to your inherent curiosity. Select a topic in your area of expertise, as that way, you do not have to spend a lot of time in reviewing the basics.