Correctly break out of loops. Return errors and warnings to client.