wire up stdio, add hook for locking in posixio