added panic and warn functions