Files are now serialised

Get a null pointer exception when I save a file - see TODO doc.