add read file to main