Implement file loading and freeing functionality.