Added base directory argument