Issue warning via warnings module instead of sys.stdout