more tidying, pop errors into new files