added logging to pcurl