added sql-dir option as working directory