handle pdf files as well