Pass determined basedir along so that running also works form outside the directory