network hw2 error checks