Used file block and fixed bug