cleanup file loading