updated pre backup script functionality