catch missing contents case; code formatting