fixed SYNC command, added handleErrorNo for printing of errors, cleaned up system outs.