fix problem with readonly disks (fix #50)