Updated file api after reviewing