added backup feature to prepare_dp.py