made it so that the mapped frame is no longer null. file writing still doesn't work though