Fixed globalError function
Added error charts for both train and test datasets