added try/except in audio_close and formatcheck in audio_open