File retrieval fix for MongoDB files