Localize running and failure inside readpw()