don't calculcate avgcolor outside the function using it
readd display of system load to debug failures