exit with code=5 on migration error