added ReplaceTypeOnLine + adjusted DEBUG format to match Java