added conditional for optional ratings field
added absolute path for secret keys