flush after print - seems to solve output issues