Rename
Avoid empty contents exception.
Add MediaType verification.