[Haskell-beginners] how to read file with locking