saves/reads id from file along with more checks to prevent request uses