Fix attach disk error checks
Refactor disk logic into disk.go