added file copying
moved io related functions to separate package
stdout and stderr logging added
polished the cli interface