[code cleanup] Remove duplicated buffer allocation & file read