Moved log position to render function