null check for file open
implemented parse tree
added logic for RLE format with '#$'
code cleanup