logs a warning if we fail to delete a file

prevents ClassCastException