Catch errors properly, prevent compiler from compiling macro files directly