Made changes as per the suggestion on pull request,except for the async version of mimeCheck.