Script for atomic stdio