function to add timestamp to scripts