API to delete a file