add print debug + fix max_line