Error handling while opened wrong binary file