Added ability to get the last error from the services so it can be logged.