make sure to check that directory exists