More robust method to set plugin path