add basepath variable to script to remove errors