Improve discovery of main plugin file