Added logging function to image loader threads