add file size check, fix lstore directory for output