Some fixes for better single file io