moved errors to separate file