Refactor to function files->zip