improved directory seeking