Set status code before hijackwrite function

need to output http status here, as no access to responseWriter from user-defined function