bugfix: deal with non-contact file being opened as contact file

Change-Id: I947aae321347b347e7437625fc517d3004591979
(cherry picked from commit 327838517968f7b97784a06f459a8801cb7d1fee)