make deletePath error message optional