converting ClamScan to Scala