Additional check for malformed lines implemented.