added flask logging.