Enable core output and some specific settings in production, fix some bugs