Moved errors to its own file