remove debug statements, fix return code to be zero in success case