Refactor File Module