pass basePath to plugin callbacks