Make migration process a bit more solid

We validate proposals on migration, and also give more information about the script where a crash might occur.
Sorry, I guess I don't understand what you would like to see :/ Can you show some pseudocode?