added error-checked parsing of input file for offers and requests