Convert file to vector