Writes monitor library to a uniquely named file.