displaying 'loading' animation when the file contents are being loaded