added some logging to script