Changing process to use a function, and to wait to send prowl request.  Made logging better.