Added a base dir variable