added log messages to script