use failf to format error messages