Added error handler for expired media