Fixed file read/write for slow non-blocking raw i/o
Fixed memory issue on wrong decoding
Added clean option to sync action