Reads file and convert to array