Added optional path argument
Added doc comment