Reads file, index out of bounds on drawing