Added PIN code check to example script