Add check for empty lines