Changes made to work with CRONTAB by Pete
debug the problem dplicating images