read file in scala + add try/catch