read file and transfer to float