Got input/output loop working.