Refactored to attempt discovery of ext when no ext specified