Added guards to check for valid scale and target resolution input