Add debug messaging to script