better error on wrong dir