Used java.nio file reader instead of BufferedReader