Fixed library read/write tests