Sorry to be confusing - my post was really about figuring out the import order.
I find the order in which you import & validate is key!
Does it error out right away? - Does turning on the debugger help to find the area causing the issue?
you tried it on InBeforeInsertRecord() how about InAfter? you need to find the correct trigger