added error check block for saving parse obj