Scala stuff for BFiles