Profile IO and tests