Add load/write profile events, fix several file location issues.