Fix bracket and print debug_msg