added and tested functionality for block storing in block based file