Sync errno and print it out