updated documentation
Corrected file close bug
Updated place of hooks
comment buggy add to other branch
Added output