Now can context switch from polling file and mainloop