Ignoring empty lines when extracting information