Flag checks

added checks for various params flags
removed debug print statements