Clean up load file code.