build: added interface checking and nicer snprintf checking