Adding support for sending big files
Adding explicit chmod to prevent possible issues with umask()