add warning handler