print and exit regardless on write IOError