Updated to work when run from arbitrary directory