added a new argument to openFile function to truncate the file content at certain length
reorganized assets blocks