add image fileType checking, have to use async