updated to support file flags
unified code style