added some error checking to up* functions