Automation phat, how to set relay by gpio pins

Hello, I have a problem with the automation phat. The libraries cleanup the gpio state, so when I switch the relay to on by python and execute the program, the relay will be turned off by the termination of the python scipt. That is not what I need and I realy dont understand why you did that. I control the python script by more complex java program.

Where are the source files of the automation phat hidden?

Than I tried to switch on the relay by directly switching the pins with wiring pi. This does not work either, why . Due to this layout the relay is controlled by gpio 16


So
gpio export 16 in
should turn the relay on but it doesnt.

Thank you for help.