To deal with a missing column there is this thread:
You could use a Java snippet to detect a missing column.
Also you might adapt this example: