Close file after ppm write