Added some additional advice on certain error conditions, fixed the code to handle user supplied headers.