Refactored the file sharing code
Refactored the file sharing code