Re-added the print of the output if the script is run as the main script.