bsmf added, writer.py updated.