moving errors to separate file