Added a sanity check () and changed test -b to test -e for tape device