Fix insert file, add pause resume functions