Cleaned up write messages and added an error if eventloop isn't installed.