x/y flipping, rescaling, output list to a file