Evolution of magnetic fields around a Kerr black hole