Added logging capability

(Bug when used locally due to CORS)