Keep your generator away from doors and windows:

Generator safety is essential.

One common mistake that people make is placing their generator to close to their home where carbon monoxide contained in the engine exhaust accumulates in occupied spaces. Keep your generator at least 20 feet away from occupied spaces and direct the engine exhaust downwind. When power is a must, remember to take your generator outside.

Your generator is there for you but using it safely requires you to take action.

Source: https://zcu.io/jbLn