added first implementation of 'addfile' functionality.