add try/catch block if no available connection