separated callback into validation and callback for file extenstion