Writing  proxy_thread function
Deletion of unwanted files