Hi JCL, I've attached a zip file with the script file and the log file rather than post it as with all the printf's to try to sort this out it is quite long. Appreciate the help. Was able to get by the errors by removing the stop value, but didn't find the reason for the error. Thanks P