adjusted javadoc
adjusted getDimension test as it could fail when random int was even
only set dimension if file has correct format
now wrong file format is also tested