Solved another little bug linked to next_line(). In the meanwhile, the error handling has improved a little.
Removed the logging