Ignore IOError on sys.stdout.flush() and sys.stderr.flush()
Handle shape files with non-latin file name + tr() fixes