Return proper http status
Make debug mode a config option