turn on bash debugging and split dev script into two parts