Critical bug fix: Check return values of network operations!