Added bitwise flags, filename input