Added debugging statements
Added flags