statucCode setting should work until headersSent