Fix disk file handle errors.

Remove reduntante break.
Correct return value.
Working version of dir control.
Remove some debug prints.
Failed to debug version. But working.