Fixed bug in file flag creator