Elucidation of antimicrobial activity and mechanism of action by N-substituted carbazole derivatives