Log the mode at the beginning of the script