Modified the error handling, now a success will not generate an error.