image output cleanup