implement stat, read and append commands and corresponding tests