add debug log for perl