stat: Bug with allocated string size fixed. Obsolete code removed.