improved "bad magic" error message