cleanup code as now we do not have in-memory images or files