Added try/catch block to play sound function.