Set the output position of the main block

The main block is put at the bottom of a script
with this modification.