added command error check
better timestamp management