Fix to just write the idleness file if the idle time is not empty