add debug mode for flask