Read somewhere on the interweb:

Library code is ugly because it cannot use global variables. Libraries are more difficult to modify, build, install, and test than standalone programs, and so are inappropriate for file formats that change every day.

The result is just full of global variables that get changed here or there, making a function behaviour totally change. And when it comes to adding a new file format? If you are lucky, it will easy. If not, good luck.

File this in the "DON'T" folder.