small improvement in handle response functions, response is now first writen to tempfile befor being handeled