Improve lfn.py, add command-line options