updated charles script to use log file