Better save the file if a pdf is created despite errors