add comment
add 'building' flag to prevent multiple simultaneous build
handle file naming differences when directory outputs