Added in ability to read from file.

Also added a bit of checking for error request types.