improve checkings in debug.c
fix line number after first file