Numerous file object fixes