Change frames=-1 to frames=None
Add read() function
WIP write()