Export command - better error validation