support timeout for loader. Fixes #427