Using Java singleton to save configurations