Improved success and failure handling