added copy media files code