Use linetype 1 for polygons, check if iodevice is already open