add missing CAutoFile::IsNull() check in main

Rebased-From: 84857e87e42e412336ea60d0f8544c1679bab827
Github-Pull: #5437
Merge remote-tracking branch 'bitcoin/0.10'