properly check for BP JS file