Added error_chain.h to keep track of the errors