Fixing a few issues when requiring - adding an error when no callback is provided