c wrapper takes resigind directory as basedir