Setup_bam_logging.sh fails silently on re-install

Please review and merge

This PR contains the fixes for 
PAAS-140- Setup_bam_logging.sh fails silently on re-install