modified to exclude plugins directory