added the r option in rm command, so that it removed the directory instead of throwing an error for it being a directory and cannot delete it