Changed the error handling, now we store errors in an array