Added more main thread IO functions