Read the file in a dataflow.
Add a conditional split which redirects processing according to what has been read - two outputs: Build Success and the rest.
Each different path sets a variable appropriately.
Destination is irrelevant - use the trash destination.
Now you have a variable which you can use to decide what to do next.