Enhancement in lifespan of halide perovskite solar cells