now checks if a pdf already exists