Add -e option to detect errors while running

Adding also -x to see what's going on.