Added composer check. Refactor File.php.