add error message for fail to create pdf