Added gpio port close retry