added outputImage function for debugging purpose