gracefull shutdown if pdf does not exist

I made a small check, if the passed PDF does exists and do a gracefull shutdown if it doesn't