remove redundant formatting from error functions