Return -1 if the file is cached but there was an error or -2 if the