reduced parameters for writeError* functions