cleaned up output further and fixed when to used cached files