debugging bg script