Extract attributes from txt file