Fixed permissions to use octals, also tweaked logging.