Make sure pdf_file exists before checking path