Increased resiliance to I/O troubles, fix bugs