added REFRESHED_AT environment variable, added to upgrade packages and fixed a typo