Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.
I've just checked manual to be sure, and there's no info at all, what happens when load_csv fails (I'm not saying it happens here). It says it always returns ds_grid ID, so I understand that on fail it should be empty, but should still return some id.