functests: add new test for testing safe mode write errors