added test for state dir