debugging options, writing to file