add a file and some logic to handle error repository items