Fix mismatching class/struct declarations
Don't write to /tmp folder; that requires root permissions