This is the new function for the scriptlog