more robust checking of status code
abort is now finish, giving greater flexibility of messages