If the unlocking doesn't work line 328 will fail with an IOError: "Resource unavailable"