Changed Blocking I/O to Non-Blocking I/O