Changed to blocking I/O