added support for rtMedia attachment import and some error handling