Use macro to check extension