removed unused variable InitialDirectory